//
//  WYUiView+IBInsepectable.swift
//  weibo
//
//  Created by 王玉东 on 16/4/7.
//  Copyright © 2016年 wyd. All rights reserved.
//

import UIKit


extension UIView {
    
   //cornerRadius

    @IBInspectable var cornerRadius : CGFloat {

        get {
    
              return layer.cornerRadius
    
            }
        
        set {
            
        layer.cornerRadius = newValue

            if cornerRadius > 0 {
            
            layer.masksToBounds = true
             
            }else{
                
            layer.masksToBounds = false
            
            }
        
        }

    }
    
    
    @IBInspectable var borderWidth: CGFloat {
    
        get {
            
             return layer.borderWidth
        }
    
        set {
        
        layer.borderWidth = newValue
        
        }
    
    }

}






